package com.test;

import java.util.Arrays;

/**
 * @author liqingbo
 */
public class Main {

    public static void main(String[] args) {
        // write your code here
//        int[] a={9,2,3,4,7,1,5};
        Cat[] a = {new Cat(3, 3), new Cat(5, 5), new Cat(1, 1)};
//        Dog[] a = {new Dog(3), new Dog(5), new Dog(6)};

        Sorter<Cat> sorter = new Sorter();
        sorter.sort(a, new CatWeightComparator());
        System.out.println(Arrays.toString(a));
        sorter.sort(a, new CatHeightComparator());
        System.out.println(Arrays.toString(a));

    }

}
